package com.yuandian.api.management.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yuandian.api.management.validate.SelectFlag;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 原始样包过滤配置表-实体
 * @author zfsn
 * @date 2023-4-13
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "原始样包过滤配置表", description = "")
@TableName("conf_original_data_filter")
public class ConfOriginalDataFilter extends BasePage<ConfOriginalDataFilter> {

	/**
	 *
	 */
	@ApiModelProperty(value = "主键id", notes = "")
	@TableId(type = IdType.AUTO)
	private Integer id;

	/**
	 *
	 */
	@ApiModelProperty(value = "规则名称", notes = "")
	private String ruleName;

	/**
	 *
	 */
	@ApiModelProperty(value = "业务资源编码（多个之间逗号隔开）", notes = "")
	private String resourceCode;

	/**
	 *
	 */
	@ApiModelProperty(value = "捕获开始时间", notes = "")
	private LocalDateTime startTime;

	/**
	 *
	 */
	@ApiModelProperty(value = "捕获结束时间", notes = "")
	private LocalDateTime endTime;

	/**
	 * 最多不能超过100000条
	 */
	@ApiModelProperty(value = "设置的捕获数据条数", notes = "最多不能超过100000条")
	private Integer captureCount;

	/**
	 *
	 */
	@ApiModelProperty(value = "已捕获的条数", notes = "")
	private Integer capturedCount;

	/**
	 * 10.1.1.1
	 */
	@ApiModelProperty(value = "请求ip，以prep(不包含)或in(包含)开头，多个间逗号隔开，如：prep:10.1.1.2", notes = "10.1.1.1")
	private String requestIp;

	/**
	 * 10.1.1.1
	 */
	@ApiModelProperty(value = "响应ip，以prep(不包含)或in(包含)开头，多个间逗号隔开，如：in:10.1.1.2", notes = "10.1.1.1")
	private String responseIp;

	/**
	 * 0: 未执行，1:执行中,2:执行完成
	 */
	@ApiModelProperty(value = "规则执行结果", notes = "0: 未执行，1:执行中,2:执行完成")
	private Integer enable;

	/**
	 * 未同步, 1:同步中，2:同步成功,3同步失败
	 */
	@ApiModelProperty(value = "同步实时流状态，0:", notes = "未同步, 1:同步中，2:同步成功,3同步失败")
	private Integer status;

	/**
	 * 逗号分隔)，位置A(不限)，Q(请求包体)，P(响应包体)。如：A:bbbb,P:cccc,Q:ddddd,P:eeee,A:fffff
	 */
	@ApiModelProperty(value = "关键字(最多五个", notes = "逗号分隔)，位置A(不限)，Q(请求包体)，P(响应包体)。如：A:bbbb,P:cccc,Q:ddddd,P:eeee,A:fffff")
	private String keyword;

	/**
	 * null
	 */
	@ApiModelProperty(value = "", notes = "null")
	private String createBy;

	/**
	 * null
	 */
	@ApiModelProperty(value = "", notes = "null")
	private LocalDateTime createTime;

	/**
	 * 1启用
	 */
	@ApiModelProperty(value = "是否启用", notes = "1启用")
	private Integer isEnable;

	/**
	 *
	 */
	@ApiModelProperty(value = "更新时间", notes = "")
	private LocalDateTime updateTime;

	/**
	 * 0正常；1删除。该字段使用在实时流对配置系统做删除的功能字段
	 */
	@ApiModelProperty(value = "逻辑删除", notes = "0正常；1删除。该字段使用在实时流对配置系统做删除的功能字段")
	private Integer isDel;

	/**
	 * 同步规则成功后更新该字段，配置系统需要展示
	 */
	@ApiModelProperty(value = "同步时间", notes = "同步规则成功后更新该字段，配置系统需要展示")
	private LocalDateTime syncTime;

	/**
	 *
	 */
	@ApiModelProperty(value = "主键id", notes = "")
	@NotNull(message = "参数ids 不能为空", groups = SelectFlag.class)
	@TableField(exist = false)
	private List<Integer> ids;
}